﻿using System;
using System.Data;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;

namespace AnyOffice.general.chatroom
{
    public partial class index : ModulePage
    {

 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["action"] != null)
            {
                new ChatUserDao().Exit(base.Conn, base.User.Identity.Name);
            }
            ChatSessionsDao dao2 = new ChatSessionsDao();
            DataView defaultView = dao2.SelectAll(base.Conn).DefaultView;
            defaultView.RowFilter = "State=1";
            if (defaultView.Count > 0)
            {
                this.rptChatroom.DataSource = defaultView;
                this.rptChatroom.DataBind();
            }
            else
            {
                this.litMessage.Text = base.ShowMessage("暂无开放的聊天室");
            }
        } 


    }
}
